package com.kozyrev.myhello;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class MyHelloActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        android.os.Bundle tempBundle=this.getIntent().getExtras();
        if (tempBundle != null){
        String vivodNaEkran= tempBundle.getString("name");
        setContentView(R.layout.main);
        TextView myTextView = (TextView) this.findViewById(R.id.textView2);
        if (vivodNaEkran != null && vivodNaEkran.trim().length() > 0) {
        myTextView.setText("Hello, my dear "+ vivodNaEkran);					}
        else{
            myTextView.setText("Please, return to previous screen and enter our name.");
            }
        }
    }
}